package classscanner;

import java.util.Scanner;  
  
public class ScannerDemo2{      
    public static void main(String[] args){  
        Scanner scanner = new Scanner("1 2 3 4 5 6 7 8 9 10");
        //default delimiter " "
        //scanner.useDelimiter(", ");
  
        while (scanner.hasNextInt()) {  
            int num = scanner.nextInt();  
            //imprimir los archivos pares
            if (num % 2 == 0)  
                System.out.println(num);  
        }
        scanner.close();
    }  
} 